草庐IT

python - Windows错误 : [Error 126] when loading a DLL with ctypes

全部标签

ruby-on-rails - Ruby Time.parse 给我超出范围的错误

我正在使用Time.parse从字符串创建时间对象。出于某种原因Time.parse("05-14-200919:00")导致参数我们的范围错误,而Time.parse("05-07-200919:00")没有有什么想法吗? 最佳答案 如果您知道字符串的格式,请使用:Time.strptime(date,format,now=self.now){|year|...}http://www.ruby-doc.org/core-1.9/classes/Time.html#M000266它将解决您的问题,并且可能比Time.parse更快。

ruby-on-rails - Rails ActiveRecord:PG::错误:错误:列引用 "created_at"不明确

我正在努力解决对象中的错误,但完全不确定问题出在哪里。这是模型的样子:classCar:car_colorsendclassCarColor:car_colorsend这里是查询:@cars=Car.all(:joins=>:car_colors,:conditions=>{:car_colors=>{:color_id=>params[:id_number]}},:order=>"cars.created_atDESC")错误输出:PG::Error:ERROR:columnreference"created_at"isambiguousLINE1:...d"WHERE"car_co

ruby-on-rails - 编译器未能生成可执行文件。 (运行时错误)

我最近升级到了OSMountainLion。我正在处理的项目需要gemsys-proctable作为依赖项,但是当我运行bundleinstall时,我得到:Fetchinggemmetadatafromhttps://rubygems.org/............Installingsys-proctable(0.9.2)withnativeextensionsGem::Installer::ExtensionBuildError:ERROR:Failedtobuildgemnativeextension./Users/mgriffel/.rvm/rubies/ruby-1.9.

ruby-on-rails - 运行 bundle install 时出现 Nokogiri 错误

尝试让克隆的Rails应用程序运行。运行bundleinstall时出现此错误:Usingmini_portile(0.5.0)Installingnokogiri(1.6.0)Gem::InstallError:nokogirirequiresRubyversion>=1.9.2.Anerroroccurredwhileinstallingnokogiri(1.6.0),andBundlercannotcontinue.Makesurethat`geminstallnokogiri-v'1.6.0'`succeedsbeforebundling.但这是rbenvversion的输出:

ruby - 找不到 bundle 命令 Windows x64

我刚刚用HerokuToolbelt安装了ruby​​,问题是当我执行bundleinstall时它给我这个错误:sh.exe":/c/ProgramFiles(x86)/ruby-1.9.3/bin/bundle:"c:/Program:badinterpreter:Nosuchfileordirectory根据这个问题Bundlecommandnotfound.BadInterpreter我应该更改PATH,但我不知道该怎么做,我更改了WindowsPATH环境变量,甚至更改为C:\ruby-1.9.2\bin我得到了类似的错误:sh.exe":/c/ruby-1.9.3/bin/

Ruby 错误 Net::ReadTimeout

我正在使用httparty进行一系列API调用。前两个API调用成功,但第三个失败。它暂停大约60秒(默认超时时间),然后返回此错误:/Users/luigi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:158:in`rescueinrbuf_fill':Net::ReadTimeout(Net::ReadTimeout)from/Users/luigi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:152:in`rbuf_fill'from

ruby-on-rails - 如何解决 RubyMine "' ruby​​-debug-ide' isn't installed”错误

我得到错误:Cannotstartdebugger.Gem'ruby-debug-ide'isn'tinstalledoritsexecutablescript'rdebug-ide'doesn'texist.但所有gem都已成功安装:gem'ruby-debug-ide'gem'debase'我可以手动运行“rdebug-ide”:$rdebug-ideUsingruby-debug-base0.2.1Usage:rdebug-ideissupposedtobecalledfromRDT,NetBeans,RubyMine,ortheIntelliJIDEARubyplugin.Th

ruby - 从我的 Ruby 应用程序构建 Windows 可执行文件?

我希望能够将Ruby应用程序发送给一些同事,而无需他们安装Ruby解释器。最好是单个exe。我用谷歌搜索并找到了“RubyScript2Exe”。您对此有何体验?除了构建exe之外,是否还有其他此类工具或更好的方法? 最佳答案 我已经使用了大约3次,没有遇到任何问题,而且我在10台服务器上运行了其中一个应用程序,从未遇到过任何问题。所以,我认为RubyScript2Exe与ruby​​一样好。 关于ruby-从我的Ruby应用程序构建Windows可执行文件?,我们在StackOverf

ruby-on-rails - 已激活 spring 1.4.0,但 Gemfile 需要 spring 1.3.3[错误]

我的服务器运行正常,但是当我尝试通过railsc进入控制台时,出现以下错误。/home/munam/.rvm/gems/ruby-2.2.0@jugojuice/gems/bundler-1.10.6/lib/bundler/runtime.rb:34:in`blockinsetup':Youhavealreadyactivatedspring1.4.0,butyourGemfilerequiresspring1.3.3.Prepending`bundleexec`toyourcommandmaysolvethis.(Gem::LoadError)from/home/munam/.rv

ruby - Ruby 中的名称错误

对于这段代码:classmyBaseClassdeffuncTest()puts"baseClass"endendmyBaseClass.new.funcTest我收到一个错误:NameError:undefinedlocalvariableormethod`myBaseClass'formain:Objectfromc:/Users/Yurt/Documents/ruby/polymorphismTest.rb:9from(irb):145:in`eval'from(irb):145fromc:/Ruby192/bin/irb:12:in`'irb(main):152:0>x=myB